<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>待处理详情页</title>
    <link rel="stylesheet" href="../../lib/layui/css/layui.css">
</head>

<style>
    .tdAdapt {
        font-size: 16.0pt;
        word-wrap: break-word;
        word-break: break-all;
    }

    .textarea {
        margin-right: 3px;
    }

    .divarea {
        margin-bottom: 5px;
    }
    .tub{
        font-size: 16px;
        margin-right: 5px;
    }
</style>

<body>
<div class="ok-body" style="background: #F8F8F8">
    <div class="layui-row ">
        <div class="layui-col-md9" style="background-color:#f8f8f8;">
            <div class="layui-row">
                <hr class="layui-bg-gray">
                <fieldset class="layui-elem-field">
                    <legend>警情详情 <span class="layui-badge layui-bg-orange">待处理</span></legend>
                    <div class="layui-field-box " style="margin-left: 20px;">
                        <div class="layui-row">
                            <div class="layui-col-md9">
                                <div class="divarea">
                                    <i class="tub layui-icon layui-icon-username" style="color: #1E9FFF;"></i>
                                    <sapn class="textarea">处理人:马琪</sapn>
                                </div>
                                <div class="divarea">
                                    <i class="tub layui-icon layui-icon-home" style="color: #FF5722;"></i>
                                    <sapn class="textarea">处理单位 : 杨林开发区派出所</sapn>
                                </div>
                            </div>
                        </div>
                    </div>
                    <hr class="layui-bg-gray">
                    <div>
                        <div style="background: #d2d2d2">
                            <div style="width: 80%;height: 100%;margin: 0 auto;">
                                <div class="layui-collapse" lay-filter="caseData">
                                    <div class="layui-colla-item">
                                        <h2 class="layui-colla-title" style="font-size: 16px"><span id="caseDataChange">隐藏</span>警情信息
                                        </h2>
                                        <div class="layui-colla-content layui-show" style="background-color:#fdfdfd;">
                                            <div style="background-color:#fdfdfd;">
                                                <iframe scrolling="no" frameborder="0" src="caseData.html" width="100%"
                                                        height="700px" id="caseData"
                                                        onload="this.height=0;var fdh=(this.Document?this.Document.body.scrollHeight:this.contentDocument.body.offsetHeight);this.height=(fdh>700?fdh:700);"></iframe>

                                            </div>

                                        </div>
                                    </div>
                                </div>
                                <div style="background-color:#fdfdfd;margin-top: 10px;padding-top: 20px;">
                                    <iframe scrolling="no" frameborder="0" src="processData.html" width="100%"
                                            height="700px" id="processData"
                                            onload="this.height=0;var fdh=(this.Document?this.Document.body.scrollHeight:this.contentDocument.body.offsetHeight);this.height=(fdh>700?fdh:700)"></iframe>

                                </div>

                            </div>

                        </div>
                    </div>
                </fieldset>
            </div>
        </div>
        <div class="layui-col-md3" style="background-color:#f8f8f8;">
            <div class="layui-row">
                <hr class="layui-bg-gray"/>
                <fieldset class="layui-elem-field">
                    <legend>分派信息</legend>
                    <div style="background-color: #f8f8f8;height: auto;margin:15px 20px 0 30px">
                        <form class="layui-form" action="">
                            <div class="layui-form-item">
                                <i class="tub layui-icon layui-icon-username" style="color: #1E9FFF;"></i>
                                <label>分派者 : </label>
                                <span>张三（指挥中心主任）</span>
                            </div>
                            <div class="layui-form-item">
                                <i class="tub layui-icon layui-icon-home" style="color: #FF5722;"></i>
                                <label>分派单位 : </label>
                                <span>指挥中心</span>
                            </div>
                            <div class="layui-form-item">
                                <i class="tub layui-icon layui-icon-log" style="color: #FFB800;"></i>
                                <label>分派时间 : </label>
                                <span>2020-09-25 15：01：29</span>
                            </div>
                            <div class="layui-form-item">
                                <i class="tub layui-icon layui-icon-read" style="color: #009688;"></i>
                                <label>警情描述 : </label>
                                <span>xx学院李某某网贷20000元</span>
                            </div>
                            <div class="layui-form-item">
                                <i class="tub layui-icon layui-icon-diamond" style="color: #ff1e31;"></i>
                                <label>督办级别 : </label>
                                <span>一级</span>
                            </div>
                        </form>
                    </div>
                </fieldset>
            </div>
        </div>
    </div>
</div>
<br/>
</body>

<script src="../../lib/layui/layui.js"></script>
<script src="../../js/jquery.min.js"></script>
<script src="../../js/selectMore.js"></script>
<script src="../../js/application.js"></script>

<script>
    let processDataHeight=0

    layui.use(['element'], function () {
        //警情详细内容显示隐藏
        var element = layui.element;
        element.on('collapse(caseData)', function(data){
            if(processDataHeight==0){
                processDataHeight=$("#processData").height();
            }
            if(!data.show){
                if(processDataHeight<800){
                    $("#processData").height(800)
                }
                $("#caseDataChange").html("显示")
            }else{
                $("#processData").height(processDataHeight)
                $("#caseDataChange").html("隐藏")
            }
        });
    });


    $("#caseData").on("load", function () {
        this.contentWindow.getParentData("传递参数给案情页面,用于查询")
    })

    $("#processData").on("load", function () {
        var parentData = {
            "count": 2
        }
        this.contentWindow.getParentData(parentData)
    })

    function caseReturnData(returnData) {

    }

    function processReturnData(returnData) {
        $("#processData").height(returnData.height)
        processDataHeight=returnData.height
    }
    //文档下载窗口
    function showProcessContent(clickId) {
        layui.use(['layer'], function () {
            var layer = layui.layer;

            function getFiles(fileData) {
                var fils = "";
                var htmlLeft = '<div><a href="javascript:;">'
                var htmlright = '</a></div>'
                for (var i = 0; i < fileData.size; i++) {
                    fils += htmlLeft + fileData.content[i].fileName + htmlright;
                }
                return fils;
            }

            function showContent(clickId) {
                var content = " 经调查,发现本次案情复杂,需多次深入调查,调查结果在附件中"
                var data = {
                    "size": 3,
                    "content": [
                        {"fileName": "调查附件1.docx"},
                        {"fileName": "调查附件2.docx"},
                        {"fileName": "调查附件3.docx"}
                    ]
                }
                var flies = getFiles(data);
                var htmlContent = '<fieldset class="layui-elem-field"><legend>反馈内容</legend><div class="layui-field-box">' + content +
                    '</div></fieldset><fieldset class="layui-elem-field"><legend>附件</legend><div class="layui-field-box">' + flies + ' </div></fieldset>'
                //页面层
                layer.open({
                    type: 1,
                    title: "反馈信息",
                    skin: 'layui-layer-rim', //加上边框
                    area: ['700px', '500px'], //宽高
                    content: '<div style="padding:50px;">' + htmlContent + '</div>'
                });
            }

            showContent(clickId);
        })
    }

</script>

</html>